package org.dtrd.modules.food.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.food.entity.po.DtrdExtEmsYwCookbookCategory;

import java.util.Date;

/**
 * <p>
 * 菜谱分类
 * </p>
 *
 * @author QR
 * @since 2021-12-09
 */
@Getter
@Setter
@ApiModel(value = "菜谱分类详情")
public class CookbookCategoryDetail {

    private Integer dataId;


    @ApiModelProperty("分类名称")
    private String categoryName;

    @ApiModelProperty("分类描述")
    private String categoryDesc;

    @ApiModelProperty("创建时间")
    private Date categoryCreateTime;

    private String categoryThumb;

    public CookbookCategoryDetail parseFromPo(DtrdExtEmsYwCookbookCategory po) {
        dataId = po.getDataId();
        categoryName = po.getCategoryName();
        categoryDesc = po.getCategoryDesc();
        categoryCreateTime = po.getCategoryCreateTime();
        categoryThumb = po.getCategoryThumb();
        return this;
    }
}
